import { createApp } from 'vue'

// 引入unocss css
import '@/plugins/unocss'
// 引入全局样式
import '@/styles/index.scss'

import App from './App.vue'
// 引入 element-plus
import { setupElementPlus } from '@/plugins/elementPlus'
import router, { setupRouter } from '@/router'
// 引入权限模块

import './permission'

// 创建实例
const setupAll = async () => {
  const app = createApp(App)
  //配置Element相关信息
  setupElementPlus(app)
  //配置路由信息
  setupRouter(app)
  await router.isReady()
  app.mount('#app')
}

setupAll()
